package core.profile.model;

import java.io.Serializable;
import java.sql.Date;
import java.util.HashSet;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.JoinColumn;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinTable;
import javax.persistence.ManyToMany;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import core.address.model.BasicAddress;
import java.util.Set;
import core.role.model.BasicRoles;

@Entity
@Table(name="basicprofile")

public class BasicProfile implements Serializable{

			private static final long serialVersionUID = -8767337896773261247L;
			private Long uuid;
			private Date anniversary;
			private Date birthdaydate;
			private String companyname;
			private String firstname;
			private String gender;
			private int usertype;
			private String lastname;
			private String nickname;
			private String secondname;
			private String title;
			private String businesspartnerno;
			private Date creationdate;
			private Boolean status ;
			private String emailId;
			private String aboutus;
			private String language;
			private String college;
			private BasicAddress currentAddress;
			private BasicAddress permanentAddress ;
			private Date lastmodified;
			private Set<BasicRoles> basicRoles = new HashSet<BasicRoles>(0);
		
			@Id
			@GeneratedValue
			@Column(name="uuid")
			public Long getUuid()
			{
				return uuid ;
			}
			@ManyToMany(cascade = CascadeType.ALL)
			@JoinTable(name = "basicprofile_basicroles", joinColumns = {@JoinColumn(name ="uuid") }, inverseJoinColumns = {@JoinColumn(name="basicroles_uuid")})
			public Set<BasicRoles> getBasicRoles() {
				return basicRoles;
			}
			public void setBasicRoles(Set<BasicRoles> basicRoles) {
				this.basicRoles = basicRoles;
			}
			@Column(name="profilestatus")
			public Boolean getStatus() 
			{
				return status;
			}
			
			@ManyToOne
			public BasicAddress getCurrentAddress()
			{
				return currentAddress;
			}
			@Column(name="emailid")
			public String getEmailId() 
			{
				return emailId;
			}
			
			public void setUuid(Long uuid)
			{
				this.uuid = uuid;
			}
			public void setStatus(Boolean status)
			{
				this.status = status;
			}
			
			public void setCurrentAddress(BasicAddress currentAddress)
			{
				this.currentAddress = currentAddress;
			}
			public void setEmailId(String emailId)
			{
				this.emailId = emailId;
			}
			@ManyToOne
			public BasicAddress getPermanentAddress() {
				return permanentAddress;
			}
			public void setPermanentAddress(BasicAddress permanentAddress) {
				this.permanentAddress = permanentAddress;
			}
			@Column
			public Date getAnniversary() {
				return anniversary;
			}
			public void setAnniversary(Date anniversary) {
				this.anniversary = anniversary;
			}
			@Column
			public Date getBirthdaydate() {
				return birthdaydate;
			}
			public void setBirthdaydate(Date birthdaydate) {
				this.birthdaydate = birthdaydate;
			}
			@Column
			public String getCompanyname() {
				return companyname;
			}
			public void setCompanyname(String companyname) {
				this.companyname = companyname;
			}
			@Column
			public String getFirstname() {
				return firstname;
			}
			public void setFirstname(String firstname) {
				this.firstname = firstname;
			}
			@Column
			public String getGender() {
				return gender;
			}
			public void setGender(String gender) {
				this.gender = gender;
			}
			@Column
			public int getUsertype() {
				return usertype;
			}
			public void setUsertype(int usertype) {
				this.usertype = usertype;
			}
			@Column
			public String getLastname() {
				return lastname;
			}
			public void setLastname(String lastname) {
				this.lastname = lastname;
			}
			@Column
			public String getNickname() {
				return nickname;
			}
			public void setNickname(String nickname) {
				this.nickname = nickname;
			}
			@Column
			public String getSecondname() {
				return secondname;
			}
			public void setSecondname(String secondname) {
				this.secondname = secondname;
			}
			@Column
			public String getTitle() {
				return title;
			}
			public void setTitle(String title) {
				this.title = title;
			}
			@Column
			public String getBusinesspartnerno() {
				return businesspartnerno;
			}
			public void setBusinesspartnerno(String businesspartnerno) {
				this.businesspartnerno = businesspartnerno;
			}
			@Column
			public Date getCreationdate() {
				return creationdate;
			}
			public void setCreationdate(Date creationdate) {
				this.creationdate = creationdate;
			}
			@Column
			public Date getLastmodified() {
				return lastmodified;
			}
			public void setLastmodified(Date lastmodified) {
				this.lastmodified = lastmodified;
			}
			/**
			 * @return the aboutus
			 */
			@Column
			public String getAboutus() {
				return aboutus;
			}
			/**
			 * @param aboutus the aboutus to set
			 */
			public void setAboutus(String aboutus) {
				this.aboutus = aboutus;
			}
			/**
			 * @return the language
			 */
			@Column
			public String getLanguage() {
				return language;
			}
			/**
			 * @param language the language to set
			 */
			public void setLanguage(String language) {
				this.language = language;
			}
			/**
			 * @return the college
			 */
			@Column
			public String getCollege() {
				return college;
			}
			/**
			 * @param college the college to set
			 */
			public void setCollege(String college) {
				this.college = college;
			}
}
